using System;
using System.Data;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;


public partial class TreeViewPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            LoadData();
        }
    }
    void LoadData()
    {
        string connectionString =
                WebConfigurationManager.ConnectionStrings[
                "RCVDB2000"].ConnectionString;

        ControlHelper cls = new
        ControlHelper(connectionString);
        cls.CommandText =
        "select * from tblProvinces;"+
        "select top 50 * from tblJSAccounts";
        cls.CommandType = CommandType.Text;
        cls.InitProperties();
        cls.FillDataSetToTreeView(
        this.TreeView1,"Root","","ProvinceID");        
        cls.Finalize();
    }
}
